package com.itheima.demo3;

import java.util.ArrayList;
import java.util.Collections;
import java.util.stream.Collectors;

public class FunctionDemo1 {
    public static void main(String[] args) {
        /**
         *   方法引用
         *      格式：
         *          类对象::方法名
         */

        //创建集合对象
        ArrayList<String> arrayList = new ArrayList<>();
        Collections.addAll(arrayList,"1","2","3","4","5","6");

        arrayList.stream().map(s -> Integer.parseInt(s)).forEach(s-> System.out.println(s));

        arrayList.stream().map(Integer::parseInt).forEach(s-> System.out.println(s));
    }
}
